package fag.core.game.test.asteroids;

import fag.core.game.StandardDoodad;
import fag.core.geometry.Vector2D;
import fag.core.model.Model;

public class Missile extends StandardDoodad {

	private Vector2D speed;
	
	public Missile(Model model, Vector2D position, Vector2D speed, double angle) {
		super(model);
		setTranslation(position);
		this.speed = speed;
		rotate(angle, getBounds().getWidth() / 2.0, getBounds().getHeight() / 2.0, Referential.RELATIVE);
	}

	public void step(double dt) {
		translate(speed.x * dt, speed.y * dt, Referential.ABSOLUTE);
	}
}
